package com.gjw.strategy;

import com.gjw.planeWar.Bullet;
import com.gjw.planeWar.HeroPlane;

/**
 * @author gjw19
 * @date 2019/5/18
 */
public class OneFireStrategy implements FireStrategy {
    @Override
    public void fire(HeroPlane heroPlane) {
        int bX = heroPlane.getX() + HeroPlane.WIDTH / 2 - Bullet.WIDTH / 2;
        int bY = heroPlane.getY() - Bullet.HEIGHT / 2;
        new Bullet(bX, bY);
    }
}
